package com.kish.web;

import com.kish.domain.Brand;
import com.kish.domain.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo04 {
    public static void main(String[] args) {
//        User zhang = new User();
//        zhang.setName("zhang");
//        zhang.setId(1);
//        System.out.println(zhang);
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        User lee =applicationContext.getBean(User.class);
        System.out.println(lee);

        Brand song  =  applicationContext.getBean(Brand.class);
        System.out.println(song);
    }
}
